home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 14 / Mac Magazin and MacEasy Magazine CD - Issue 14.iso / Wissenschaft & Technik / Tools Plus 2.6.1 Evaluation Kit / Tools Plus 2.6.1 / User Manual / 14-System Polling (4 of 4) < prev    next >
INI File  |  1994-09-17  |  27KB  |  590 lines

  1. [Display using Monaco 9]
  2.  
  3.  
  4.  
  5. doListBox (event)
  6. `````````````````
  7. Indicator that user clicked or double-clicked in a list box.
  8.  
  9. The doListBox event reports that the user has clicked somewhere in a list box (on a line that contains text or a blank line).  This event is not generated when the user just scrolls the list box by using its scroll bar.
  10.  
  11. Programming Considerations
  12. ``````````````````````````
  13. • If your application treats double-clicks in list boxes like clicking
  14.   the OK button, use the GetListBoxLine function to determine which line
  15.   was selected (or GetListBoxLines if multiple lines can be selected in
  16.   the list box), then flash the OK button with the FlashButton
  17.   procedure.
  18.  
  19. • This event will never occur when the watch cursor is displayed, since
  20.   list boxes cannot be clicked.
  21.  
  22. • A doListBox event is not generated when the user clicks list boxes in
  23.   a dialog box or desk accessory.  These events are handled
  24.   automatically.
  25.  
  26. Valid Polling Record Fields
  27. ```````````````````````````
  28. Poll.Window
  29. Poll.ListBox.Num
  30. Poll.ListBox.DoubleClick
  31.  
  32. ------------------------------------------------------------------------
  33.  
  34. doClick (event)
  35. ```````````````
  36. Indicator that the user has completed or in the midst of a click, double-click, triple-click, or drag.
  37.  
  38. A click, double-click, triple-click, or drag has been reported in the active window.  The event may still be in progress when PollSystem reports it, such as a double-click with the mouse button still down on the second click.  The Mouse part of the event record contains a field called What, which is the mouse event code that tells your application what type of mouse click has occurred.  The rest of the mouse record contains details on each mouse-down and mouse-up event.
  39.  
  40. A series of decisions are made by PollSystem to obtain single and multiple-click information, as well as drags.  Although they can be somewhat altered by your application (as explained later), the steps taken are as follows:
  41.  
  42.  1  The first mouse-down of a click is in the active window’s content
  43.     region, and is not in a button, picture button, scroll bar, editing
  44.     field, list box, pop-up menu or custom control.
  45.  
  46.  2  If no mouse-up event is in the queue, a “single-click, mouse still
  47.     down” mouse event code is returned.  If a mouse-up event is in the
  48.     queue, it is used to complete the click.
  49.  
  50.  3  If the time between the first mouse-down and the first mouse-up
  51.     (single-click) is too long to be the first click of a multiple
  52.     click, PollSystem returns with a “single-click completed” mouse
  53.     event code.
  54.  
  55.  4  If the time between the first mouse-down and the first mouse-up
  56.     (single-click) is short enough to constitute the first click of a
  57.     multiple click, PollSystem checks the event queue for a mouse-down
  58.     event that would be the beginning of a second click.  If a mouse-
  59.     down event is not found in time, PollSystem returns with a “single-
  60.     click completed” mouse event code.
  61.  
  62.  5  If a second mouse-down event is in the queue, it must be in the
  63.     active window’s content region, and must not be in a button, picture
  64.     button, scroll bar, editing field, list box, pop-up menu or custom
  65.     control.  If any of these conditions are violated, the mouse-down
  66.     event is left in the queue and PollSystem returns with a “single-
  67.     click completed” mouse event code.  If the conditions are not
  68.     violated, PollSystem continues.
  69.  
  70.  6  The second click has begun.  If no mouse-up event is in the queue, a
  71.     “double-click, mouse still down” mouse event code is returned.  If a
  72.     mouse-up event is in the queue, it is used to complete the click.
  73.  
  74.  7  If the time between the second mouse-down and the second mouse-up
  75.     (double-click) was too long to be the second click of a triple-
  76.     click, PollSystem returns with a “double-click completed” mouse
  77.     event code.
  78.  
  79.  8  If the time between the second mouse-down and the second mouse-up
  80.     (double-click) is short enough to constitute the second click of a
  81.     triple-click, PollSystem checks the event queue for a mouse-down
  82.     event that would be the beginning of a third click.  If a mouse-down
  83.     event is not found in time, PollSystem returns with a “double-click
  84.     completed” mouse event code.
  85.  
  86.  9  If a third mouse-down event is in the queue, it must be in the
  87.     active window’s content region, and must not be in a button, picture
  88.     button, scroll bar, editing field, list box, pop-up menu or custom
  89.     control.  If any of these conditions are violated, the mouse-down
  90.     event is left in the queue and PollSystem returns with a “double-
  91.     click completed” mouse event code.  If the conditions are not
  92.     violated, PollSystem continues.
  93.  
  94. 10  The third click has begun.  If no mouse-up event is in the queue, a
  95.     “triple-click, mouse still down” mouse event code is returned.  If a
  96.     mouse-up event is in the queue, it is used to complete the click and
  97.     return a “triple-click completed” mouse event code.
  98.  
  99. Programming Considerations
  100. ``````````````````````````
  101. • If at some point your application is only concerned with a mouse down
  102.   in a certain area, or a single-click only, or a double-click only, you
  103.   can disrupt the click as soon as you have obtained enough information
  104.   by using ResetMouseClicks.  For example, if your application only
  105.   cares about a single-click and it gets a “double-click, mouse still
  106.   down” mouse event code, ResetMouseClicks will tell PollSystem “forget
  107.   the rest of this click.”
  108.  
  109. • A triple-click should be scrutinized by your application because the
  110.   time between the third mouse-down and the third mouse-up may be longer
  111.   than the allowable limit for consecutive clicks.  This will also
  112.   happen when the user double-clicks, then presses down the mouse button
  113.   the third time and drags.  Use the GetDblTime function to determine
  114.   the maximum number of clock ticks which can occur between mouse-down
  115.   and up events to constitute a consecutive click.
  116.  
  117. • Your application can place cursor zones on a window, then use
  118.   FindCursorZone to determine if a click occurred in one of those zones.
  119.   This can make parts of your window, such as pictures or icons, click-
  120.   sensitive.  See “Cursors” for information about Cursor Tables and
  121.   Cursor Zones.
  122.  
  123. • This event will never occur when the watch cursor is displayed, since
  124.   only buttons can be (optionally) clicked.
  125.  
  126. • Poll.Event is populated with the mouse-down event (as obtained from
  127.   the toolbox Event Manager) that is responsible for the doClick event.
  128.   Some applications need this event to drive custom controls.
  129.  
  130. • A doClick event is not generated when the user clicks in a desk
  131.   accessory’s editing fields.  The process is handled automatically.
  132.  
  133. Valid Polling Record Fields
  134. ```````````````````````````
  135. Poll.Window
  136. Poll.Mouse.What
  137. Poll.Mouse.Down[1].Where
  138. Poll.Mouse.Down[1].When
  139. Poll.Mouse.Down[1].Modifiers
  140. Poll.Event                     (for first mouse-down event only)
  141.  
  142. The next three fields are valid only if the mouse event code is inClick1, inClick2Drag, inClick2, inClick3Drag, or inClick3.
  143.  
  144. Poll.Mouse.Up[1].Where
  145. Poll.Mouse.Up[1].When
  146. Poll.Mouse.Up[1].Modifiers
  147.  
  148. The next three fields are valid only if the mouse event code is inClick2Drag, inClick2, inClick3Drag, or inClick3.
  149.  
  150. Poll.Mouse.Down[2].Where
  151. Poll.Mouse.Down[2].When
  152. Poll.Mouse.Down[2].Modifiers
  153.  
  154. The next three fields are valid only if the mouse event code is inClick2, inClick3Drag, or inClick3.
  155.  
  156. Poll.Mouse.Up[2].Where
  157. Poll.Mouse.Up[2].When
  158. Poll.Mouse.Up[2].Modifiers
  159.  
  160. The next three fields are valid only if the mouse event code is inClick3Drag, or inClick3.
  161.  
  162. Poll.Mouse.Down[3].Where
  163. Poll.Mouse.Down[3].When
  164. Poll.Mouse.Down[3].Modifiers
  165.  
  166. The next three fields are valid only if the mouse event code is inClick3.
  167.  
  168. Poll.Mouse.Up[3].Where
  169. Poll.Mouse.Up[3].When
  170. Poll.Mouse.Up[3].Modifiers
  171.  
  172. Poll.Mouse.Where
  173.  
  174.  
  175.   CONST                   {Mouse Event Codes                      }
  176.     inClick1    = 1;      {single-click completed                 }
  177.     inClick2    = 2;      {double-click completed                 }
  178.     inClick3    = 3;      {triple-click completed                 }
  179.     inClick1Drag=-1;      {single-click, mouse still down         }
  180.     inClick2Drag=-2;      {double-click, mouse still down         }
  181.     inClick3Drag=-3;      {tripple-click, mouse still down        }
  182.  
  183.  
  184.  
  185. Note: For C programmers…  The polling record’s arrays are documented is
  186.       using Pascal nomenclature (the elements are numbered 1, 2 and 3).
  187.       In C, the same array’s elements are numbered 0, 1 and 2 (they
  188.       start at zero).  When C programmers read:
  189.           Poll.Mouse.Down[1].Where
  190.       it indicates the first element of the array, which translates to
  191.       the following C source code:
  192.           Poll.Mouse.Down[0].Where
  193.  
  194. ------------------------------------------------------------------------
  195.  
  196. doPopUpMenu (event)
  197. ```````````````````
  198. Indicator that the user selected a pop-up menu item.
  199.  
  200. Programming Considerations
  201. ``````````````````````````
  202. • If your application determines that the item selected by the user
  203.   should be checked, use CheckPopUp or PopUpMark to mark the item with a
  204.   check mark or other special character.  By default, the previously
  205.   selected item is automatically unchecked (although you can override
  206.   this behavior when creating the pop-up menu).
  207.  
  208. • If your application determines that the selected pop-up menu item
  209.   affects the active editing field, you may want to validate the field’s
  210.   edited text before allowing the user to complete the action.  If this
  211.   is the case, use GetFieldString to obtain a copy of the edited text,
  212.   then your application can check the string for errors.  If an error is
  213.   detected, display an appropriate alert box.  If no error is detected,
  214.   call the SaveFieldString procedure to save the edited text as the
  215.   field’s string, then complete the menu’s action.
  216.  
  217. • A doPopUpMenu event is not generated when the user selects desk
  218.   accessory menus.  These selections are handled automatically.
  219.  
  220. Valid Polling Record Fields
  221. ```````````````````````````
  222. Poll.Window
  223. Poll.Menu.Num
  224. Poll.Menu.Item
  225. Poll.Modifiers
  226.  
  227. ------------------------------------------------------------------------
  228.  
  229. doPictButton (event)
  230. ````````````````````
  231. Indicator that user has clicked a picture button, or is holding down a repeating picture button.
  232.  
  233. The doPictButton event reports that the user has clicked a picture button in the active window.  The doPictButton event is also reported if the user holds down a repeating picture button.  Repeating picture button’s will produce events as long as: [1] the mouse button is held down, [2] the button does not reach the end of its range, and [3] the mouse pointer stays inside the picture button’s region.
  234.  
  235. Programming Considerations
  236. ``````````````````````````
  237. • If the “automatic value change” option is not on, your application has
  238.   to set the picture button’s value by using SetPictButtonVal or
  239.   SetPictButtonValSelect.
  240.  
  241. • If you have created a picture button that is “lock selected” with the
  242.   “automatic value change” option off, and you’ve done this to validate
  243.   the picture button before proceeding to the next stage, do the
  244.   following: validate the button.  If it can proceed to the next stage,
  245.   use SetPictButtonValSelect to deselect the button and increment its
  246.   value, otherwise use SetPictButtonValSelect to deselect the button and
  247.   leave its value unchanged.
  248.  
  249. • If the user clicked a picture button that is functioning like a radio
  250.   button, use SelectPictButton to deselect the other picture buttons in
  251.   the group.
  252.  
  253. • This event will never occur when the watch cursor is displayed, since
  254.   picture buttons cannot be clicked.  The exception is if the
  255.   WatchCursorButtons procedure has been used to allow the watch cursor
  256.   to click picture buttons.
  257.  
  258. • Picture buttons with the “repeating events” option turned on may
  259.   produce doNothing events if your application calls PollSystem more
  260.   frequently than the button changes its value.  This will cause no ill
  261.   side-effects, but you should be aware of this.
  262.  
  263. • A doPictButton event is not generated when the user clicks picture
  264.   buttons in another application, control panel or desk accessory.
  265.   These events are handled automatically.
  266.  
  267. • A negative button number value indicates that the decrementing half of
  268.   a split button was clicked (i.e., “-5” indicates that button 5 is a
  269.   split button, and its value is being decreased).
  270.  
  271. Valid Polling Record Fields
  272. ```````````````````````````
  273. Poll.Window
  274. Poll.Button.Num
  275. Poll.Modifiers
  276.  
  277. ------------------------------------------------------------------------
  278.  
  279. doClickControl (event)
  280. ``````````````````````
  281. Indicator that user clicked a custom control.
  282.  
  283.   The doClickControl event reports that the user has clicked in a custom control.  This event must be handled entirely by your application, since only you know how your custom control should behave.
  284.  
  285. Programming Considerations
  286. ``````````````````````````
  287. • This event will never occur when the watch cursor is displayed, since
  288.   custom controls cannot be clicked.
  289.  
  290. Valid Polling Record Fields
  291. ```````````````````````````
  292. Poll.Window
  293. Poll.Event
  294. Poll.Modifiers
  295.  
  296. ------------------------------------------------------------------------
  297.  
  298. doManual (event)
  299. ````````````````
  300. Indicator that an event has been reported that can’t be processed by Tools Plus.
  301.  
  302.   The doManualEvent event reports that some type of event has occurred which should be processed by your application.  This includes seven (7) possible types of events as defined by the Toolbox Event Manager, which are listed below.  If your application does not make use of any of these events, it can ignore the doManualEvent event code.
  303.  
  304.  
  305.    diskEvt     The Standard File Package takes care of all disk-inserted
  306.                events, so applications using this package can ignore
  307.                diskEvt events.  If your application is unusual and it
  308.                circumvents the Standard File package, your application
  309.                will have to handle disk-inserted events itself.
  310.  
  311.    networkEvt  Your application needs to respond to network events only
  312.                if it is going to be communicating with the AppleTalk
  313.                manager.  If it is, you should read the appropriate
  314.                documentation in chapter 10 Vol. 2 of Inside Macintosh
  315.                regarding networks.
  316.  
  317.    driverEvt   If your application does not intend to work with device
  318.                drivers, it can ignore these events.  Otherwise, you
  319.                should read the appropriate documentation in Inside
  320.                Macintosh regarding device drivers.
  321.  
  322.    app1Evt     Application-defined events 1 through 4.  These are events
  323.    app2Evt     whose meaning is defined by your application.  If your
  324.    app3Evt     application does not define custom events, it can ignore
  325.    app4Evt     these event codes.  Note that app4Evt (or osEvt) will
  326.    osEvt       only be reported if your application does not respond to
  327.                Suspend/Resume events.  See the SIZE resource for
  328.                details.  If your application does respond to Suspend/
  329.                Resume events, it will receive a doSuspend or doResume
  330.                Tools Plus event.
  331.  
  332.    kHighLevel- Your application needs to respond to these events only if
  333.      Evt       you have defined the SIZE resource to respond to high-
  334.                level events.  See the SIZE resource for details.
  335.  
  336.  
  337. Valid Polling Record Fields
  338. ``````````
  339. Poll.Event
  340.  
  341. ------------------------------------------------------------------------
  342.  
  343. doMoveWindow (event)
  344. ````````````````````
  345. Indicator that user moved a window.
  346.  
  347.   The doMoveWindow event reports that the user has repositioned a window by dragging it by its title bar.  Most applications will choose to ignore this event.
  348.  
  349. Programming Considerations
  350. ``````````````````````````
  351. • The dragged window might not be the active window.  The user can drag
  352.   an inactive window by holding down the Command key before beginning
  353.   the drag.
  354.  
  355. • If part or all of a window is exposed by the drag and needs to be
  356.   refreshed, a subsequent call to PollSystem will report a doRefresh
  357.   event for this window.
  358.  
  359. • Your application may call WindowStatus to obtain the window’s new
  360.   location in the screen’s global co-ordinates.
  361.  
  362. • This event will never occur when the watch cursor is displayed, since
  363.   the title bar cannot be clicked.
  364.  
  365. • A doMoveWindow event is not generated when the user drags a desk
  366.   accessory.  The process is handled automatically.
  367.  
  368. Valid Polling Record Fields
  369. ```````````````````````````
  370. Poll.Window
  371.  
  372. ------------------------------------------------------------------------
  373.  
  374. doGrowWindow (event)
  375. ````````````````````
  376. Indicator that user has changed a window’s size.
  377.  
  378.   The doGrowWindow event reports that the user has changed a window by dragging a window’s “size box.”  This will always occur on the active window.
  379.  
  380. Programming Considerations
  381. ``````````````````````````
  382. • Your application can call the WindowStatus procedure to obtain the
  383.   window’s new width and height in pixels.
  384.  
  385. • If the window is enlarged either vertically or horizontally, a
  386.   subsequent call to PollSystem will report a doRefresh event for this
  387.   window.
  388.  
  389. • This event will never occur when the watch cursor is displayed, since
  390.   the size box cannot be clicked.
  391.  
  392. • A doGrowWindow event is not generated when the user changes a desk
  393.   accessory’s size.  The process is handled automatically.
  394.  
  395. Valid Polling Record Fields
  396. ```````````````````````````
  397. Poll.Window
  398.  
  399. ------------------------------------------------------------------------
  400.  
  401. doClickDesk (event)
  402. ```````````````````
  403. Indicator that user clicked in the desk top.
  404.  
  405.   The doClickDesk event reports that the user has clicked in the desk top.  Most applications will choose to ignore this event, however, it can be used to deselect objects on the active window.
  406.  
  407. Programming Considerations
  408. ``````````````````````````
  409. • This event will never occur when a modal window is active, since
  410.   clicks cannot occur outside of the window.
  411.  
  412. • This event will never occur when the watch cursor is displayed, since
  413.   the desk top cannot be clicked.
  414.  
  415. Valid Polling Record Fields
  416. ```````````````````````````
  417. Poll.What
  418.  
  419. ------------------------------------------------------------------------
  420.  
  421. doZoomWindow (event)
  422. ````````````````````
  423. Indicator that user has changed a window’s size and/or location by zooming.
  424.  
  425.   The doZoomWindow event reports that the user has changed a window’s size and/or position by clicking the “zoom box.”  This will always occur on the active window.  Applications will typically ignore this event, or treat it similarly to the doGrowWindow event.
  426.  
  427. Programming Considerations
  428. ``````````````````````````
  429. • Your application can call the WindowStatus procedure to obtain the
  430.   window’s new width and height in pixels, as well as its new location
  431.   in the screen’s global co-ordinates.
  432.  
  433. • The window’s entire contents are erased during the zoom.  A subsequent
  434.   call to PollSystem will report a doRefresh event for this window.
  435.   Responding to the doRefresh event will regenerate the window’s
  436.   contents.
  437.  
  438. • This event will never occur when the watch cursor is displayed, since
  439.   the zoom box cannot be clicked.
  440.  
  441. • A doZoomWindow event is not generated when the user click’s a desk
  442.   accessory’s zoom box.  The process is handled automatically.
  443.  
  444. ------------------------------------------------------------------------
  445.  
  446. doSuspend (event)
  447. `````````````````
  448. Indicator that your application is about to be suspended.
  449.  
  450.   The doSuspend event reports that your application will be suspended (or become a “background” application) the next time you call PollSystem.  This occurs under MultiFinder or System 7 when a desk accessory or other application is launched, or when an inactive window belonging to a desk accessory or another application is activated.
  451.  
  452. Programming Considerations
  453. ``````````````````````````
  454. • If your application is cutting, copying or pasting specialized objects
  455.   (i.e. not text that is handled by editing fields), copy this material
  456.   from your local scrap to the clipboard.
  457.  
  458. ------------------------------------------------------------------------
  459.  
  460. doResume (event)
  461. ````````````````
  462. Indicator that your application has been resumed.
  463.  
  464.   The doResume event reports that your application has become the active application.  This occurs under MultiFinder or System 7 after your application has become suspended (see the doSuspend event).
  465.  
  466. Programming Considerations
  467. ``````````````````````````
  468. • If your application is cutting, copying or pasting specialized objects
  469.   (i.e. not text that is handled by text editing fields), you may want
  470.   to check the clipboard to see if it contains the specialized objects
  471.   that you can paste, then copy them to your local scrap.
  472.  
  473. ------------------------------------------------------------------------
  474.  
  475. doChgInField (event)
  476. ````````````````````
  477. Indicator that the contents of your application’s active editing field have been changed.
  478.  
  479.   The doChgInField event is reported whenever the active field in your application is altered, either through typing, cutting, pasting (including the use of the PasteIntoField routine), clearing, or undoing/redoing (using the Edit menu).  Most applications will ignore this event.
  480.  
  481. Valid Polling Record Fields
  482. ```````````````````````````
  483. Poll.Window
  484. Poll.Field
  485.  
  486. ------------------------------------------------------------------------
  487.  
  488. SetNullTime
  489. ```````````
  490. Set the number of ticks (1/60 sec) your application can wait until it receives a doNothing event, and can perform one cycle of its background process.  These settings affect only doNothing events.
  491.  
  492.    pascal void SetNullTime (long ForegroundTime; long BackgroundTime);
  493.  
  494.    procedure SetNullTime (ForegroundTime, BackgroundTime: longint);
  495.  
  496.   ForegroundTime is the amount of time (in 1/60 second “ticks”) your application can wait between receiving doNothing events when the application is the active application.  You can specify a value from 0 (maximum background processing speed at the expense of other applications) to 15 (four cycles per second).
  497.  
  498.   BackgroundTime is the amount of time (in 1/60 second “ticks”) your application can wait between receiving doNothing events when the application is suspended (i.e. when another application is active under MultiFinder or System 7).
  499.  
  500.   By default, Tools Plus is initialized with ForegroundTime and BackgroundTime set to 0, meaning your application will have maximum performance at the expense of other applications and processes.  Normally, applications that do background processing will set ForegroundTime  to 1, and BackgroundTime  to a higher value, thus slowing down the background processing when your application is suspended.  If your application doesn’t do any background processing, use the maxNullTime constant to allow other applications and process the maximum utilization of the processor.
  501.  
  502.   Your application can change the values of ForegroundTime and BackgroundTime at any time.  The change will take effect the next time that PollSystem is called.
  503.  
  504. Also see:  WaitAvail.
  505.  
  506.   CONST                      {Background process scheduling          }
  507.     maxNullTime = $7FFFFFFF; {Infinite time between doNothing events }
  508.  
  509. ------------------------------------------------------------------------
  510.  
  511. WaitAvail
  512. `````````
  513. Determine if the Macintosh running your application supports scheduled processing.  This determines if SetNullTime’s settings will have any effect.
  514.  
  515.    pascal Boolean WaitAvail(void);
  516.  
  517.    function WaitAvail: BOOLEAN;
  518.  
  519.   This function returns a value of true if scheduled background processing is supported, or false if it is not.  If the Macintosh running your application doesn’t support scheduled background processing, then SetNullTime’s settings will have no effect, and your application will receive a doNothing event each time it calls PollSystem when there are no events available.  Internally, this routine reports if the WaitNextEvent trap is available to your application.
  520.  
  521. ------------------------------------------------------------------------
  522.  
  523. ResetMouseClicks
  524. ````````````````
  525. Discontinue a mouse’s “drag” or multiple clicks in progress.
  526.  
  527.    pascal void ResetMouseClicks(void);
  528.  
  529.  
  530.    procedure ResetMouseClicks;
  531.  
  532.   The PollSystem function is used to detect single-clicks, double-clicks, and triple-clicks, as well as dragging which occurs between a mouse-down and mouse-up event.  In some applications, it may suffice to know that the user pressed the mouse button with the cursor being within a specific region or cursor zone, without concern for the mouse button’s release.  Or an application may allow a single-click only, thereby disallowing double or triple clicks.
  533.  
  534.   In such cases, the ResetMouseClicks procedure can be used to tell Tools Plus that sufficient mouse information has been retrieved, and to reset the click and drag mechanism.  This reset will clear the current click or drag from PollSystem’s event queue.  The next time the mouse button in pressed down, it will be considered to be a first mouse-down of either a single-click, double-click, triple-click, or drag.
  535.  
  536. See PollSystem for details on how the system responds to mouse events.
  537.  
  538. ------------------------------------------------------------------------
  539.  
  540. ApplicationSuspended
  541. ````````````````````
  542. Determine if your application has been suspended (i.e. not the active application).
  543.  
  544.    pascal Boolean ApplicationSuspended(void);
  545.  
  546.    function ApplicationSuspended: BOOLEAN;
  547.  
  548.   This function returns a value of true if a desk accessory or another application is active under MultiFinder or System 7).  A value of false is returned if your application is active, even though your application may not have any windows open.
  549.  
  550.   When running under MultiFinder or System 7, your application needs to have a SIZE resource with the “AcceptSuspendEvents” bit set to “1.”  See the SIZE resource for details.
  551.  
  552. ------------------------------------------------------------------------
  553.  
  554. “Field To Event” Cross reference
  555. ````````````````````````````````
  556. The following table provides a quick cross reference between each field in the polling record, and which events make use of that field.
  557.  
  558. Poll.Button     doButton, doPictButton
  559.  
  560. Poll.Event      doClick (first mouse down only), doClickControl,
  561.                 doManualEvent, doResume, doSuspend
  562.  
  563. Poll.Field      doClickField, doChgInField
  564.  
  565. Poll.Key…       doKeyDown, doAutoKey, doKeyUp
  566.  
  567. Poll.ListBox…   doListBox
  568.  
  569. Poll.Menu…      doMenu, doPopUpMenu
  570.  
  571. Poll.Modifiers  doGoAway, doButton, doMenu, doKeyDown, doAutoKey,
  572.                 doKeyUp, doClickControl, doPopUpMenu, doPictButton
  573.  
  574. Poll.Mouse…     doClick
  575.  
  576. Poll.ScrollBar… doScrollBar
  577.  
  578. Poll.What       (all) doNothing, doChgWindow, doRefresh, doGoAway,
  579.                 doButton, doMenu, doKeyDown, doAutoKey, doKeyUp,
  580.                 doClickField, doScrollBar, doListBox, doClick,
  581.                 doPopUpMenu, doPictButton, doClickControl,
  582.                 doManualEvent, doMoveWindow, doGrowWindow, doClickDesk,
  583.                 doZoomWindow, doSuspend, doResume, doChgInField
  584.  
  585. Poll.Window     doChgWindow, doRefresh, doGoAway, doButton, doKeyDown,
  586.                 doAutoKey, doKeyUp, doClickField, doScrollBar,
  587.                 doListBox, doClick, doPopUpMenu, doPictButton,
  588.                 doClickControl, doMoveWindow, doGrowWindow,
  589.                 doZoomWindow, doChgInField
  590.